from tkinter import*
x = int(input("Введите X:"))
y = int(input("Введите У:"))
m = int(input("Масштаб изображения:"))
figure =[0, 0, 10, 0, 10, 10, 20, 10, 20, 30, 10, 30, 10, 20, 0, 20, 0, 0]

if m == 0 and x>=0 and x<=0 and y>=0 and y<=0:
    pass
else:
     if m > 0 and 0 *m+x>=0 and 0*m+y>=0 and 20+x<=500 and 20*m+y<=500:
        pass
     else:
        if m < 0 and 20*m + y>=0 and 0*m+x<=500 and 0*m+y<=500:
            pass
        else:
            print ("Размер фигуры привышает размер поля")
            exit()
root = Tk()
root.title("ИТ марафон")
root.geometry("500x500")
canvas = Canvas (bg = "White" ,width = 500, height = 500)
canvas.pack(anchor = CENTER, expand = 1)

canvas.create_polygon (figure[0] *m+x, figure[1] *m+y,
                       figure[2] *m+x, figure[3] *m+y,
                       figure[4] *m+x, figure[5] *m+y,
                       figure[6] *m+x, figure[7] *m+y,
                       figure[8] *m+x, figure[9] *m+y,
                       figure[10]*m+x, figure[11]*m+y,
                       figure[12]*m+x, figure[13]*m+y,
                       figure[14]*m+x, figure[15]*m+y,
                       figure[16]*m+x, figure[17]*m+y,)
root.mainloop()
